﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Cmd
{
    [AttributeUsage(AttributeTargets.Property)]
    public class OptionAttribute : Attribute
    {
        public string Name { get; set; }
		public string Command { get; set; }
		public string Alias { get; set; }
		public string Description { get; set; }
        public bool Required { get; set; }
        public object DefaultValue { get; set; }

		public OptionAttribute(string command, string description)
        {
			Command = command;
			Description = description;
        }

        public override string ToString()
        {
            return string.Format("{0}{1}, DefaultValue = {2}", Command, string.IsNullOrWhiteSpace(Alias) ? "" : string.Format(" ({0})", Alias), DefaultValue == null ? "null" : DefaultValue);
        }
    }
}
